package by.gamedev.site.client.app;

import java.util.HashSet;
import java.util.Set;

import by.gamedev.site.client.app.place.ProxyListPlace;
import by.gamedev.site.client.managed.request.ApplicationEntityTypesProcessor;

import com.google.gwt.requestfactory.shared.EntityProxy;

public class GameDevApp {

    static boolean isMobile = false;

    public static boolean isMobile() {
        return isMobile;
    }

    public void run() {
        //nothing
    }

    protected HashSet<ProxyListPlace> getTopPlaces() {
        final Set<Class<? extends EntityProxy>> types = ApplicationEntityTypesProcessor.getAll();
        final HashSet<ProxyListPlace> rtn = new HashSet<ProxyListPlace>(types.size());

        for (final Class<? extends EntityProxy> type : types) {
            rtn.add(new ProxyListPlace(type));
        }

        return rtn;
    }
}
